package towerDefense.libraries;

import java.awt.Dimension;
import java.util.ResourceBundle;
import util.libraries.ImageToFileNameLibrary;


public class TDLibraries
{
    private static final String LIBRARY_IMPORT_DATA =
        "towerDefense.libraries.libdata";
    public static ImageToFileNameLibrary TerrainLibrary;
    public static UnitLibrary UnitLibrary;
    public static TowerLibrary TowerLibrary;
    public static ProjectileLibrary ProjectileLibrary;


    public static void CreateAllLibraries (Dimension dim)
    {
        ResourceBundle rb = ResourceBundle.getBundle(LIBRARY_IMPORT_DATA);
        ProjectileLibrary =
            new ProjectileLibrary((String) rb.getObject("projectiles"), dim);//must be made before towerlibrary
        TerrainLibrary =
            new ImageToFileNameLibrary((String) rb.getObject("terrain"), dim);
        UnitLibrary = new UnitLibrary((String) rb.getObject("units"), dim);
        TowerLibrary = new TowerLibrary((String) rb.getObject("towers"), dim);

    }

}
